<template>
  <h1>事件绑定指令</h1>
  <button @click="f">按钮1</button>
  <button v-on:click="f">按钮1</button>
  <br>
  <input type="text" placeholder="请输入您想搜索的商品!" v-model="serch" @keydown.enter="f">

</template>

<script setup>
import {ref} from "vue";

const serch = ref('');
const f = ()=>{
  console.log('我是f函数!');
  alert('您想搜索的是'+serch.value+'吗？');
}
</script>


<style scoped>

</style>